package com.yyplatform.admin.platform.role.model.dto;

import java.util.Date;
import java.util.List;

import com.yyplatform.admin.platform.role.model.entity.converter.MenuParam;
import com.yyplatform.admin.infra.model.TreeNode;

import lombok.Data;

/**
 * Created on 2024-09-13
 */
@Data
public class SysMenuDTO extends TreeNode {

    private Long id;
    private Long pid;
    private String menuType;
    private String name;

    private String permissions;
    private Integer orderNum;


    private String component;
    private String routePath;
    private String routeName;

    private String redirect;

    private String remark;


    private String icon;

    private Boolean alwaysShow;
    private Boolean enabled;
    private Boolean keepAlive;
    private Boolean visible;


    private Boolean hasChildren;

    private List<MenuParam> params;

    private Date updateTime;
    private Date createTime;


    //    public Boolean getHasChildren() {
    //        return getChildren() != null && !getChildren().isEmpty();
    //    }

    public String getValue() {
        return String.valueOf(id);
    }

    public String getLabel() {
        return name;
    }

}
